# 手机验证码比较
#字符串里的值不可以被修改
import random
# 生成四位数的整型数
code = random.randrange(100000, 999999)
# 转换成字符串类型
code = str(code)
phone = input("请输入手机号：")
msg = f"欢迎登录系统，手机号是：{phone},您的验证码是：{code},"
print(msg)
data = input("请输入验证码：\n")
if data == code:
    print("登录成功")
else:
    print("验证失败")

data_list = []
while True:
    hobby = input("请输入你的爱好：（Q/q退出）\n")
    if hobby.upper() == "Q":
        break
    data_list.append(hobby)
result = "、".join(data_list)
print("这个人的爱好有：", result)
